# 根据给定的值n，分别计算1+2+...+n 和1*2*...*n
# 2021-8-6
# by Nasa
from time import *


def sum(n=3):
    j = 0
    for i in range(1, n + 1):
        j = j + i
    return j


def mutiply(n=3):
    j = 1
    for i in range(1, n + 1):
        j = j * i
    return j


t1 = time()
print(t1)
print(sum(1000))
print(mutiply(1000))
t2 = time()
print(t2)
print('time:', t2 - t1)
